<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Insert Text Demo</title>
	<style type="text/css">
		h1:before{
			content: "第" counter(mycounter) "章";
			color: blue;
		}
		h1{
			counter-increment: mycounter;
		}
		h2:before{
			content: counter(subcounter);
		}
		h2{
			counter-increment: subcounter;
		}
		
	</style>
</head>
<body>
	<h1>大标题
		<h2>小标题
			<p>文字。。。</p>
		</h2>
		<h2>小标题</h2>
		<h2>小标题</h2>
	</h1>
	<h1>大标题
		<h2>小标题
			<p>文字。。。</p>
		</h2>
	</h1>
	<h1>大标题
		<h2>小标题
			<p>文字。。。</p>
		</h2>
	</h1>
</body>
</html>